<?php if (!defined('THINK_PATH')) exit();?> <!DOCTYPE html>
<html>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<head>

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">


    <title>凯络科技后台管理系统</title>
    <meta name="keywords" content="">
    <meta name="description" content="">

    <link rel="shortcut icon" href="favicon.ico"> <link href="/Public/css/bootstrap.min14ed.css?v=3.3.6" rel="stylesheet">
    <link href="/Public/css/font-awesome.min93e3.css?v=4.4.0" rel="stylesheet">
    <link href="/Public/css/plugins/iCheck/custom.css" rel="stylesheet">
    <link href="/Public/css/animate.min.css" rel="stylesheet">
    <link href="/Public/css/style.min862f.css?v=4.1.0" rel="stylesheet">
	<link href="/Public/css/page.css" rel="stylesheet">
    <link href="/Public/css/new.css" rel="stylesheet">
	
	<script src="/Public/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="/Public/js/plugins/layer/layer.min.js"></script>

<meta http-equiv="Content-Type" content="text/html; charset=utf-8">

   <script type="text/javascript">
		function page(n,s){
			var order_number=$('#search_number').val();
			var customer_name=$('#customer_name').val();
			var salesman=$('#salesman').val();
			if(salesman!=undefined){
				location.href='wait_purchase?pageNo='+n+'&pageSize='+s+'&order_number='+order_number+'&customer_name='+customer_name+'&salesman='+salesman;
			}else{
				location.href='wait_purchase?pageNo='+n+'&pageSize='+s+'&order_number='+order_number+'&customer_name='+customer_name;
			}
			
	    	
	    }
		
		function dele(id)
		{
		    layer.confirm('确定要删除吗？',
			              {btn:['确定','取消']},
							  function(){
							      location.href='order_delete?id='+id;
							  }
						  ),
						
						  function(){return false;} 
						  
		}
		
		function list_sort(name){
			if($('#asc').val()=='asc'){
				var asc='desc';
			}else{
				var asc='asc';
			}
			var title=$('#title').val();
			var phone=$('#phone').val();
			var orderno=$('#orderno').val();
			//location.href='find?pageNo='+<?php echo ($count["pageNo"]); ?>+'&pageSize='+<?php echo ($count["pageSize"]); ?>+'&title='+title+'&phone='+phone+'&orderno='+orderno+'&name='+name+'&asc='+asc;
		}
		
		
	 </script>

</head>

<body class="gray-bg">
    <div class="wrapper wrapper-content animated fadeInRight">
         
        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>待采购订单</h5>
                        
                    </div>
                    <div class="ibox-content">
					     <form id="searchForm" class="form-inline" method="get" action="" >
					<div class="row">
                            <input type='hidden' name='pageNo' value="<?php echo ($count['pageNo']); ?>" />
                            <input type='hidden' name='pageSize' value="<?php echo ($count['pageSize']); ?>" />
                            
                            <div class='search'>
                              
                               
                               	<input class="form-control input-sm" placeholder="订单号" name="order_number" id="search_number"  value="<?php echo ($order_number); ?>" >
							   
							   	<input class="form-control input-sm" placeholder="客户" name="customer_name" id="customer_name" value="<?php echo ($customer_name); ?>"  >
                                <?php if($orders == 1): ?><input class="form-control input-sm" placeholder="业务员" name="salesman" id="salesman" value="<?php echo ($salesman); ?>"  ><?php endif; ?>
                                
							    <input type="submit" class="btn btn-sm btn-primary" name="search" value="搜索"></input>
								<a class="btn btn-white btn-sm " href="javascript:window.location.reload(true);" data-toggle="tooltip" data-placement="left"   title="刷新"> <i class="glyphicon glyphicon-repeat"></i> 刷新</a>  
							    
                            </div>
                        </div>
					    </form>
						<form id="order_handling" method="post" action="">
                        <table class="table table-bordered table-striped table-hover table_one" style="margin-top:30px;">
                            <thead>
                                <tr>
									<th width="8%">业务员</th>
								   	<th width="8%">创建日期</th>
                                    <th width="8%">订单号</th>
									<th width="8%">客户名称</th>
                                    <th width="8%">产品总货值</th>
								   	<th width="8%">折扣率</th>
                                    <th width="8%">折后货值</th>
									<th width="8%">收取运费</th>
                                    <th width="8%">总金额</th>
                                    <th width="8%">订单商品情况</th>
									<th width="20%">操作</th>
                                </tr>
                            </thead>
                            
                            <tbody>
							
                                <?php if(is_array($order_list)): foreach($order_list as $k=>$order): ?><tr>
                                    <input type='hidden' name='' value="<?php echo ($address["id"]); ?>" class='id'>
 									<td name='order_number'  class='sku'><?php echo ($order["salesman"]); ?></td>
									<td name='order_date'><?php echo date("Y-m-d",strtotime($order_list[$k]['order_date']));?></td>
									<td name='salesman'><?php echo ($order["order_number"]); ?></td>
                                    <td name='customer_name'><?php echo ($order["customer_name"]); ?></td>
                                    
                                    
                                    
                                    
                                    <td name='order_number'  class='sku'><?php echo ($order["total_price"]); ?></td>
									<td name='date_created'><?php echo ($order["discount_rate"]); ?></td>
									<td name='salesman'><?php echo ($order["discounted_value"]); ?></td>
                                    <td name='customer_name'><?php echo ($order["feright"]); ?></td>
                                    <td name='customer_name'><?php echo ($order['discounted_value']+$order['feright']); ?></td>
									<td name='operation'>
                                    	<a class="btn btn-sm btn-primary add" title="查看明细" href="<?php echo U('wait_details',array('id'=>$order['id']));?>" >查看明细</a>
                                    </td>
                                    <td>
									  	<a class="btn btn-sm btn-primary add" title="编辑" name="edit" href="<?php echo U('edit_purchase',array('id'=>$order['id']));?>">编辑</a>
                                        <a class="btn btn-sm btn-primary add" title="发货" name="finish" href="<?php echo U('order_delivery',array('id'=>$order['id']));?>">发货</a>
                                         <a class="btn btn-sm btn-primary add" title="导出" name="export" href="<?php echo U('look_down',array('order_number'=>$order['order_number']));?>">导出</a>
                                        <a class="btn btn-sm btn-primary add" title="删除" name="del" href="<?php echo U('wait_dele',array('id'=>$order['id']));?>">删除</a>
								    </td>
									
							  </tr><?php endforeach; endif; ?>
                              
                              
                            
                            </tbody>
                        </table>
                        <!--<table class="table table-bordered table-striped table-hover">
                            <thead>
                                <tr>
                                	<th width="20%">订单号</th>
                                	<th width="20%">创建日期</th>
                                    <th width="10%">业务员</th>
								   	<th width="10%">客户名称</th>
                                    <th width="10%">订单详细内容</th>
									<th width="4%">操作</th>
                                </tr>
                            </thead>
                            <tbody>
							
                                <tr>
                                	<td name="creation_time">2016-10-22 10:10:10</td>
                                    <td name="order_number">888888</td>
									<td name="client">客户A</td>
									<td name="salesman">业务员A</td>
                                    <td class='edit' nameval='state'>
                                    	<a class="btn btn-sm btn-primary"  href="<?php echo U('execute_details');?>">查看明细</a>
                                    </td>
                                    <td>
                                    	<a class="btn btn-sm btn-primary"  href="<?php echo U('edit_execute');?>">编辑</a>
                                        <button type="submit" class="btn btn-sm btn-primary"> 完成</button>
                                        <button type="submit" class="btn btn-sm btn-primary"> 预览</button>
                                        <button type="submit" class="btn btn-sm btn-primary"> 导出</button>
                                        <a class="btn btn-sm btn-primary"  href="">删除</a>
								    </td>
									
							  </tr>
                            </tbody>
                        </table>-->
			          </form>
						
	<!-- 分页代码 -->
<div class="fixed-table-pagination" style="display: block;">
	<div class="pull-left pagination-detail">
		<span class="pagination-info">显示第 1 到第 <?php echo ($count["pageSize"]); ?> 条记录，总共 <?php echo ($count["count"]); ?> 条记录</span>
		<span class="page-list">每页显示 
			<span class="btn-group dropup">
				<button type="button" class="btn btn-default  btn-outline dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
					<span class="page-size"><?php echo ($count["pageSize"]); ?></span> <span class="caret"></span></button>
					<ul class="dropdown-menu" role="menu">
					<li class="<?php if( $count["pageSize"] == 10): ?>active<?php endif; ?>"><a href="javascript:page(1,10,'');">10</a></li>
					<li class="<?php if( $count["pageSize"] == 25): ?>active<?php endif; ?>"><a href="javascript:page(1,25,'');">25</a></li>
					<li class="<?php if( $count["pageSize"] == 50): ?>active<?php endif; ?>"><a href="javascript:page(1,50,'');">50</a></li>
					<li class="<?php if( $count["pageSize"] == 100): ?>active<?php endif; ?>"><a href="javascript:page(1,100,'');">100</a></li>
					</ul>
					</span> 条记录</span>
				</div>
				<div class="pull-right pagination-roll">
				<ul class="pagination pagination-outline">
					<li class="paginate_button <?php if( $count["pageNo"] == 1): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(1,<?php echo ($count["pageSize"]); ?>,'');"><i class="fa fa-angle-double-left"></i></a></li>
					<li class="paginate_button <?php if( $count["pageNo"] == 1): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(<?php echo ($count["pageNo"]); ?>-1,<?php echo ($count["pageSize"]); ?>,'');"><i class="fa fa-angle-left"></i></a></li>
					 <?php if( $count["countpage"] > 10 ): if( $count["pageNo"] < 5 ): ?><li class="paginate_button "><a href="javascript:" onClick="page(1,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==1)?'current':'' ?>">1</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(2,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==2)?'current':'' ?>">2</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(3,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==3)?'current':'' ?>">3</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(4,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==4)?'current':'' ?>">4</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(5,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==5)?'current':'' ?>">5</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(6,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==6)?'current':'' ?>">6</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(7,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==7)?'current':'' ?>">7</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(8,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==8)?'current':'' ?>">8</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo ($count["countpage"]); ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo ($count["countpage"]); ?></a></li>
						<?php elseif($count["pageNo"] < $count["num"] and $count["pageNo"] >= 5): ?>
							<li class="paginate_button "><a href="javascript:" onClick="page(1,<?php echo ($count["pageSize"]); ?>,'');">1</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-3; ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo $count['pageNo']-3; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-2; ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo $count['pageNo']-2; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']-1; ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo $count['pageNo']-1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo ($count["pageNo"]); ?>,<?php echo ($count["pageSize"]); ?>,'');" id='current'><?php echo $count['pageNo']; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+1; ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo $count['pageNo']+1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+2; ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo $count['pageNo']+2; ?></a></li> 
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['pageNo']+3; ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo $count['pageNo']+3; ?></a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo ($count["countpage"]); ?>,<?php echo ($count["pageSize"]); ?>,'');"><?php echo ($count["countpage"]); ?></a></li>
						<?php else: ?>
							<li class="paginate_button "><a href="javascript:" onClick="page(1,<?php echo ($count["pageSize"]); ?>,'');">1</a></li>
							<li class="paginate_button disabled"><a href="javascript:">...</a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-4; ?>,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==($count['countpage']-4))?'current':'' ?>"><?php echo $count['countpage']-4; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-3; ?>,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==($count['countpage']-3))?'current':'' ?>"><?php echo $count['countpage']-3; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-2; ?>,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==($count['countpage']-2))?'current':'' ?>"><?php echo $count['countpage']-2; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']-1; ?>,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==($count['countpage']-1))?'current':'' ?>"><?php echo $count['countpage']-1; ?></a></li>
							<li class="paginate_button "><a href="javascript:" onClick="page(<?php echo $count['countpage']; ?>,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==$count['countpage'])?'current':'' ?>"><?php echo $count['countpage']; ?></a></li><?php endif; ?>
					<?php else: ?>
						<?php $__FOR_START_388808726__=0;$__FOR_END_388808726__=$count["countpage"];for($i=$__FOR_START_388808726__;$i < $__FOR_END_388808726__;$i+=1){ ?><li class="paginate_button <?php if( $count["pageNo"] == $i+1): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(<?php echo ($i+1); ?>,<?php echo ($count["pageSize"]); ?>,'');" id="<?php echo ($count['pageNo']==($i+1))?'current':'' ?>"><?php echo ($i+1); ?></a></li><?php } endif; ?>
					<li class="paginate_button next <?php if( $count["pageNo"] >= $count.countpage): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(<?php echo ($count["pageNo"]); ?>+1,<?php echo ($count["pageSize"]); ?>,'');"><i class="fa fa-angle-right"></i></a></li>
					<li class="paginate_button next <?php if( $count["pageNo"] >= $count.countpage): ?>previous disabled<?php endif; ?>"><a href="javascript:" onClick="page(<?php echo ($count["countpage"]); ?>,<?php echo ($count["pageSize"]); ?>,'');"><i class="fa fa-angle-double-right"></i></a></li>
				</ul>
			</div>
		</div>
	<br/>
	<br/>
	</div>
	</div>
</div>
             </div>
                </div>
            </div>
             
        </div>
         
    </div>
    <script src="/Public/js/jquery.min63b9.js?v=2.1.4"></script>
    <script src="/Public/js/bootstrap.min14ed.js?v=3.3.6"></script>
    <script src="/Public/js/plugins/peity/jquery.peity.min.js"></script>
    <script src="/Public/js/content.mine209.js?v=1.0.0"></script>
    <script src="/Public/js/plugins/iCheck/icheck.min.js"></script>
    <script src="/Public/js/demo/peity-demo.min.js"></script>
	<script src="/Public/js/plugins/layer/laydate/laydate.js"></script>
    <script>
      /*  $(document).ready(function(){$(".i-checks").iCheck({checkboxClass:"icheckbox_square-green",radioClass:"iradio_square-green",})});
		 $(document).ready(function () {
		
            $('.check-all').iCheck({
			 
                checkboxClass: 'icheckbox_square-green',
                radioClass: 'iradio_square-green',
            });
        });
		
	
	$(document).ready(function() {
    $('.check-all').on('ifChecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
    	  $('.i-checks').iCheck('check');
    	});

    $('.check-all').on('ifUnchecked', function(event){ //ifCreated 事件应该在插件初始化之前绑定 
    	  $('.i-checks').iCheck('uncheck');
    	});
		
     
	  $('#check').click(function(){
		    tids='';
		    $('.i-checks').each(function(){
				if($(this).prop('checked'))
				{
					tids+=$(this).val()+',';
				}
			 })
		    $(this).attr('href','shenhe?tids='+tids);
			
		  }) 
		  
	 $('#recheck').click(function(){
		    tids='';
		    $('.i-checks').each(function(){
				if($(this).prop('checked'))
				{
					tids+=$(this).val()+',';
				}
			 })
			 if(tids=='')
			 {
				 layer.alert('请选择订单');
				 return false
			 }
		    $(this).attr('href','gocheck?tids='+tids);
			
	  }) 
	  

    
});*/
    </script>
    <div style="display:none"><script language="javascript" type="text/javascript" src="http://js.users.51.la/17825721.js"></script>
<noscript><a href="http://www.51.la/?17825721" target="_blank"><img alt="&#x6211;&#x8981;&#x5566;&#x514D;&#x8D39;&#x7EDF;&#x8BA1;" src="http://img.users.51.la/17825721.asp" style="border:none" /></a></noscript></div>
</body>
<!--Made By kailuosoft.com, TEL 171 9992 9517 -->
<script  type="text/javascript"  src="http://g.tbcdn.cn/sj/securesdk/0.0.3/securesdk_v2.js"  id="J_secure_sdk_v2" data-appkey="23416550"></script>
</html>